export interface FileItf {
    path: string;
    isFile: boolean;
    isDir: boolean;
    ext: string;
    fileName: string;
    thumbnailPath: string;
    relativePath: string;
    id: number;
    size: number;
    parentId: number;
    isImg: boolean;
    isVideo: boolean;
    duration:number;
}

/**
 * @description: 分段下载的生命周期
 * @author: tao wenbo 2419421809@qq.com
 */
export interface OnListener {
    /**
     * @description: 开始
     * @return {*}
     * @author: tao wenbo 2419421809@qq.com
     */
    onStart?: (fileName: string) => void;

    /**
     * @description: 传递进度
     * @return {*}
     * @author: tao wenbo 2419421809@qq.com
     */
    onProcess?: (current: number, total: number) => void;

    /**
     * @description: 报错
     * @return {*}
     * @author: tao wenbo 2419421809@qq.com
     */
    onFailed?: (err: any) => void;

    /**
     * @description: 返回使用时长的时间戳
     * @param {number} time 使用时长时间戳
     * @return {*}
     * @author: tao wenbo 2419421809@qq.com
     */
    onFinished?: (time: number, blob?: string) => void;

    onCanceled?: (blob?: Blob[]) => void;
}